can_modify = ((spec->flags & G_PARAM_WRITABLE) != 0 &&
(spec->flags & G_PARAM_CONSTRUCT_ONLY) == 0);
+ if ((spec->flags & G_PARAM_CONSTRUCT_ONLY) != 0)
+ label = gtk_label_new ("(construct-only)");
+ else if ((spec->flags & G_PARAM_WRITABLE) == 0)
+ label = gtk_label_new ("(not writable)");
+ else
+ label = NULL;
+
+ if (label)
+ {
+ gtk_widget_show (label);
+ gtk_style_context_add_class (gtk_widget_get_style_context (label), GTK_STYLE_CLASS_DIM_LABEL);
+ gtk_container_add (GTK_CONTAINER (editor), label);
+ }
+
/* By reaching this, we already know the property is readable.
* Since all we can do for a GObject is dive down into it's properties
* and inspect bindings and such, pretend to be mutable.
gchar *value;
gchar *type;
gchar *attribute = NULL;
+ gboolean writable;
g_value_init (&gvalue, prop->value_type);
if (pl->priv->child_properties)
attribute = g_strdup_printf ("%d", column);
}
+ writable = ((prop->flags & G_PARAM_WRITABLE) != 0) &&
+ ((prop->flags & G_PARAM_CONSTRUCT_ONLY) == 0);
+
gtk_list_store_set (pl->priv->model, iter,
COLUMN_NAME, prop->name,
COLUMN_VALUE, value ? value : "",
COLUMN_TYPE, type ? type : "",
COLUMN_DEFINED_AT, g_type_name (prop->owner_type),
COLUMN_TOOLTIP, g_param_spec_get_blurb (prop),
- COLUMN_WRITABLE, (prop->flags & G_PARAM_WRITABLE) != 0,
+ COLUMN_WRITABLE, writable,
COLUMN_ATTRIBUTE, attribute ? attribute : "",
-1);